#pragma once

using namespace System;

namespace Cephei
{
	public ref class CastException : System::Exception
	{
	public:
		CastException (String^ s) : Exception (s) {}
	};

	public ref class Assert
	{
	public:
		generic <typename T> where T : ref class
		static void NotNull (T t, String^ m)
		{
			if (t == nullptr)
				throw gcnew CastException (m);
		}
	};
	public ref class NativeNullException : System::Exception
	{
	public:
		NativeNullException () : Exception () {}
	};
}

